package biz.obake.team.touchprotector.ui;

import android.app.Activity;
import android.content.ComponentName;
import android.os.Bundle;
import biz.obake.team.android.a;
import biz.obake.team.touchprotector.g.c;
import biz.obake.team.touchprotector.tpservice.TPService;

public class LockScreenNowActivity extends Activity {
    public static void a(boolean z) {
        int i = z ? 1 : 2;
        a a2 = a.a();
        a2.getPackageManager().setComponentEnabledSetting(new ComponentName(a2, LockScreenNowActivity.class), i, 1);
    }

    /* access modifiers changed from: protected */
    public void onCreate(Bundle bundle) {
        super.onCreate(bundle);
        if ("Stopped".equals(c.c("TPService.State"))) {
            TPService.n("LockScreenNow");
        }
        boolean p = biz.obake.team.touchprotector.donation.a.p();
        boolean g = biz.obake.team.touchprotector.g.a.g("unlockable_lock_screen_now");
        boolean equals = "Locked".equals(c.c("TPService.State"));
        if (!p || !g || !equals) {
            TPService.k("Lock", "LockScreenNow");
        } else {
            TPService.k("Unlock", "LockScreenNow");
        }
        finish();
    }
}
